<?php


namespace app\controllers;


use app\models\request\ReqLogin;
use app\models\response\RespUserNavList;
use app\models\UserDto;
use app\service\SysMenuService;
use app\service\UserService;

class UserNavListController extends BaseJsonController
{
    /**
     * @param $req
     * @param $userInfo UserDto
     * @return RespUserNavList|mixed
     */
    public function doService($req, $userInfo)
    {

        $menuService = new SysMenuService();
        $menuList = $menuService->selectMenuListByUserId($userInfo->getId());
        $resp = new RespUserNavList();
        $resp->setMenuList($menuList);
        return $resp;
    }
}